﻿using DeviceMaintainGIS.BLL.User;
using DeviceMaintainGIS.Common;
using DeviceMaintainGIS.Model;
using DeviceMaintainGIS.Model.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace DeviceMaintainGIS.Controllers
{
    /// <summary>
    /// 用户登录
    /// </summary>
    public class LoginController : ApiController
    {
        /// <summary>
        /// 用户操作类
        /// </summary>
        UserOperation uo = new UserOperation();

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        // POST: api/Login
        [FilterConfig]
        public ReturnVM<UserResponse> Post([FromBody]LoginRequest request)
        {
            LogHelper.WriteLog(typeof(LoginController), "登录信息："+request.UserName + "-" + request.Password);

            ReturnVM<UserResponse> list = uo.UserLogin(request);
            return list;
        }


    }
}
